class CreateDocuments < ActiveRecord::Migration
  def self.up
    create_table :documents do |t|
      t.string :name, :limit => 50, :null => false
      t.string :organization, :address, :limit => 500, :null => false
      t.string :postal_code, :phone_number, :email, :limit => 50, :null => false
      t.references :image
      t.string :book_name, :author, :isbn, :publisher, :limit => 200, :null => false
      t.date :published_at, :null => false
      t.timestamps
    end
  end
  
  def self.down
    drop_table :documents
  end
end
